package axonactive.vision.training.dto;

import java.util.ArrayList;
import java.util.List;

import axonactive.vision.training.entity.Question;

public class QuestionDTO extends ch.ivyteam.ivy.scripting.objects.CompositeObject{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Question question;
	private List<String> listSelectedCheckBox;
	private String selectedRadio;
	private int index;
	
	public QuestionDTO() {
		super();
		this.question = new Question();
		this.question.setType("Single choice");
		this.selectedRadio="A";
	}
	public QuestionDTO(Question question, int index) {
		super();
		this.question = question;
		String[] anss = this.question.getAnswer().split("-");
		this.selectedRadio = this.question.getAnswer();
		this.listSelectedCheckBox = new ArrayList<String>();
		for (int i = 0; i < anss.length; i++) {
			this.listSelectedCheckBox.add(anss[i]);
		}
		this.index = index;
		
	}
	public Question getQuestion() {
		return question;
	}
	public void setQuestion(Question question) {
		this.question = question;
	}
	public List<String> getListSelectedCheckBox() {
		return listSelectedCheckBox;
	}
	public void setListSelectedCheckBox(List<String> listSelectedCheckBox) {
		this.listSelectedCheckBox = listSelectedCheckBox;
	}
	public String getSelectedRadio() {
		return selectedRadio;
	}
	public void setSelectedRadio(String selectedRadio) {
		this.selectedRadio = selectedRadio;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
}
